<?php /* Smarty version 2.6.26, created on 2013-12-11 16:54:20
         compiled from tenders/index.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'geturl', 'tenders/index.html', 20, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'header.html', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<table>
    <tr> 
        <th>Имя</th>
        <th>Описание</th>
        <th>Менеджер</th>
        <th>Дата добавления</th>
        <th>Дата окончания</th>  
        <th>В архиве</th>  
        <th>Операции</th>
    </tr>
<?php $_from = $this->_tpl_vars['tenders']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['d']):
?>
<tr>
    <td> <a href="/tender/<?php echo $this->_tpl_vars['d']->getId(); ?>
" > <?php echo $this->_tpl_vars['d']->name; ?>
</a></td>
    <td> <?php echo $this->_tpl_vars['d']->about; ?>
</td>
    <td> <?php echo $this->_tpl_vars['d']->manager; ?>
</td>
    <td> <?php echo $this->_tpl_vars['d']->start_date; ?>
</td>
    <td> <?php echo $this->_tpl_vars['d']->end_date; ?>
</td>
    <td> <?php if ($this->_tpl_vars['d']->archive == '0'): ?>НЕТ<?php else: ?>ДА<?php endif; ?></td>
    <td><a href="<?php echo smarty_function_geturl(array('route' => 'edittender','id' => $this->_tpl_vars['d']->getId()), $this);?>
">Редактировать</a>
     | <?php if ($this->_tpl_vars['d']->archive == '0'): ?><a href="<?php echo smarty_function_geturl(array('route' => 'archivetender','id' => $this->_tpl_vars['d']->getId()), $this);?>
">В архив</a><?php else: ?><a href="<?php echo smarty_function_geturl(array('route' => 'archivetender','id' => $this->_tpl_vars['d']->getId()), $this);?>
">Из архива</a><?php endif; ?> 
    | <a href="<?php echo smarty_function_geturl(array('route' => 'deletetender','id' => $this->_tpl_vars['d']->getId()), $this);?>
">Удалить</a></td>
</tr>
<?php endforeach; endif; unset($_from); ?>
</table>
<h2>Фильтр</h2>
<select name='cats_filter' id='cats_filter'>
<option value="0" ></option>
<?php $_from = $this->_tpl_vars['cats']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['cat']):
?>
<?php if ($this->_tpl_vars['cat']->getId() == $this->_tpl_vars['cats_filter']): ?>
<option value="<?php echo $this->_tpl_vars['cat']->getId(); ?>
" selected='selected'><?php echo $this->_tpl_vars['cat']->name; ?>
</option>
<?php else: ?>
<option value="<?php echo $this->_tpl_vars['cat']->getId(); ?>
"><?php echo $this->_tpl_vars['cat']->name; ?>
</option>
<?php endif; ?>
<?php endforeach; endif; unset($_from); ?>
</select>

<select name='projects_filter' id='projects_filter'>
<option value="0" ></option>
<?php $_from = $this->_tpl_vars['projects']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['project']):
?>
<?php if ($this->_tpl_vars['project']->getId() == $this->_tpl_vars['projects_filter']): ?>
<option value="<?php echo $this->_tpl_vars['project']->getId(); ?>
" selected='selected'><?php echo $this->_tpl_vars['project']->name; ?>
</option>
<?php else: ?>
<option value="<?php echo $this->_tpl_vars['project']->getId(); ?>
"><?php echo $this->_tpl_vars['project']->name; ?>
</option>
<?php endif; ?>
<?php endforeach; endif; unset($_from); ?>
</select>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'footer.html', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>